package com.lh.eemsserver.Service.ServiceImple;

import com.lh.eemsserver.Mapper.AdminMapper;
import com.lh.eemsserver.Service.AdminService;
import com.lh.eemsserver.po.Admin;
import com.lh.eemsserver.po.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Service
public class AdminServiceImple implements AdminService {

    @Autowired
    private AdminMapper adminMapper;


    @Override
    public int renewUserInfo(User user) {
        return adminMapper.renewUserInfo(user);
    }

    @Override
    public int newUserInfo(User user) {
        return adminMapper.newUserInfo(user);
    }

    @Override
    public List<User> listAllUser() {
        return adminMapper.listAllUser();
    }


    @Override
    public Admin getAdminName(Admin admin) {
        return adminMapper.getAdminName(admin);
    }

    @Override
    public int delUserInfo(User user) {
        return adminMapper.delUserInfo(user);
    }

    @Override
    public int renewAdminInfo(Admin admin){
        return adminMapper.renewAdminInfo(admin);
    }

    public Admin getAdminInfo( Admin admin){
        return adminMapper.getAdminInfo(admin);
    }
}
